#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @File   : a_request_learn.py
# @Email  : xuexia_xu@feidee.com
# @Time   : 2024/3/20 14:49
# @Desc   : request 使用

from requests.packages import urllib3
import json
import requests

requests.packages.urllib3.disable_warnings()


def get_data():
    # 生产url
    url = f"https://formoperation-admin.qun100.com/api/v1/mch/apply/queryPage"

    headers = {
        "X-Token": "3272e50185af4c508f595e0ab9d89427",
        "Content-Type": "application/json"
    }
    for i in range(1):
        data = {"pageNo": i, "pageSize": 10, "applyRecordStatusStr": "FINISH", "applyType": None, "businessName": None,
                "fuid": None, "idCardNumber": None, "applyRecordStatusList": ["FINISH"]}
        response = requests.post(url=url, verify=False, data=json.dumps(data), headers=headers)

        results = json.loads(response.text)['data']['rofrws']

        for datas in results:
            info = datas['applicantInfo']
            print(info['realName'], info['phoneNumber'], info['documentNumber'])


if __name__ == '__main__':
    get_data()
